﻿<%@ Page Title="User Listing" Language="C#" MasterPageFile="~/Views/Shared/OneCol.Master" AutoEventWireup="true" CodeBehind="ListUsers.aspx.cs" Inherits="StarterKits.Mvc.Membership.Views.FormsAuthenticationAdministration.ListUsers" %>
<asp:Content ID="content" ContentPlaceHolderID="Col1" runat="server">

<h2>Manage Users</h2>

<% if( ViewData.Model.Count > 0 ){ %>
<ol>
	<% foreach( MembershipUser user in ViewData.Model ){ %>
	<li><% =Html.ActionLink<P.InOut.NetMvc.Controllers.FormsAuthenticationAdministrationController>( x => x.UserDetails( (Guid)user.ProviderUserKey ), user.Email )%> 
	    (<% =Html.ActionLink<P.InOut.NetMvc.Controllers.FormsAuthenticationAdministrationController>(x => x.DeleteUser((Guid)user.ProviderUserKey), 
	         "Delete", new { onclick = "return confirm('Are you sure you want to delete " + user.UserName + "')" })%>)</li>
	<% } %>
</ol>
<% }else{ %>
No users have been entered into the system yet. <% =Html.ActionLink( "Create a new user.", "CreateUser" ) %>
<% } %>

</asp:Content>